package top.andnux.memoryleak;

import androidx.appcompat.app.AppCompatActivity;
import top.andnux.memoryleak.case1_singleton.Singleton;
import top.andnux.memoryleak.case1_singleton.SingletonActivity;
import top.andnux.memoryleak.case2_handler.HandlerActivity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void singleton(View view) {
        startActivity(new Intent(this, SingletonActivity.class));
    }

    public void handler(View view) {
        startActivity(new Intent(this, HandlerActivity.class));
    }
}
